package com.md.lesson8;

import java.util.Scanner;

public class Cube {
	
	public static long cube(long x,long y,long z) {
		long rx = x*x*x;
		long ry = y*y*y;
		long rz = z*z*z;
		
		long result = rx + ry + rz;
		return result;
	}

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		
		System.out.println("请输入第一个数：");
		int x = s.nextInt();
		System.out.println("请输入第二个数：");
		int y = s.nextInt();
		System.out.println("请输入第三个数：");
		int z = s.nextInt();
		
		long result = cube(x,y,z);
		System.out.println("最终结果是" + result);
	}

}
